<?php
	$currentItem = "Link";
?>
<include file="./Tpl/default/Admin/Public/header.html" />
<include file="./Tpl/default/Admin/Public/sidebar.html" />

<div style="float:left">
	<div>
		<h2>学院链接</h2>
		<table>
			<tr>
				<th>名字</th>
				<th>链接地址</th>
			</tr>
			<?php foreach($collegeLinks as $collegeLink):?>
			<form action="__APP__/Admin/Link/modify" method="POST">
				<input type="hidden" name="link_id" value="{$collegeLink['link_id']}">
			<tr>
				<td><input type="text" name="name" style="width:250px;" value="{$collegeLink['name']}"></td>
				<td><input type="text" name="url" style="width:300px;" value="{$collegeLink['url']}"></td>
				<td><input type="submit" value="修改"></td>
				<td><a href="__APP__/Admin/Link/delete?link_id={$collegeLink['link_id']}">删除</a></td>
			</tr>
			</form>
			<?php endforeach;?>
		</table>
	</div>
	<div>
		<h2>学校党政职能部门链接</h2>
		<table>
			<tr>
				<th>名字</th>
				<th>链接地址</th>
			</tr>
			<?php foreach($departmentLinks as $departmentLink):?>
			<form action="__APP__/Admin/Link/modify" method="POST">
				<input type="hidden" name="link_id" value="{$departmentLink['link_id']}">
			<tr>
				<input type="hidden" name="link_id" value="{$departmentLink['link_id']}">
				<td><input type="text" name="name" style="width:250px;" value="{$departmentLink['name']}"></td>
				<td><input type="text" name="url" style="width:300px;" value="{$departmentLink['url']}"></td>
				<td><input type="submit" value="修改"></td>
				<td><a href="__APP__/Admin/Link/delete?link_id={$departmentLink['link_id']}">删除</a></td>
			</tr>
			</form>
			<?php endforeach;?>
		</table>
	</div>
	<div>
		<h2>其他链接</h2>
		<table>
			<tr>
				<th>名字</th>
				<th>链接地址</th>
			</tr>
			<?php foreach($otherLinks as $otherLink):?>
			<form action="__APP__/Admin/Link/modify" method="POST">
				<input type="hidden" name="link_id" value="{$otherLink['link_id']}">
			<tr>
				<td><input type="text" name="name" style="width:250px;" value="{$otherLink['name']}"></td>
				<td><input type="text" name="url" style="width:300px;" value="{$otherLink['url']}"></td>
				<td><input type="hidden" name="link_id" value="{$otherLink['link_id']}"></td>
				<td><input type="submit" value="修改"></td>
				<td><a href="__APP__/Admin/Link/delete?link_id={$otherLink['link_id']}">删除</a></td>
			</tr>
			</form>
			<?php endforeach;?>
		</table>
	</div>
	<div>
		<h2>添加一个链接</h2>
		<table>
			<tr>
				<th>名字</th>
				<th>链接地址</th>
				<th>类型</th>
			</tr>
			<form action="__APP__/Admin/Link/add" method="POST">
			<tr>
				<td><input type="text" name="name" style="width:180px;" value=""></td>
				<td><input type="text" name="url" style="width:300px;" value=""></td>
				<td>
					<select name="type">
						<option value="0">学院链接</option>
						<option value="1">学校党政职能部门链接</option>
						<option value="2">其他链接</option>
					</select>
				</td>
				<td><input type="submit" value="确认"></td>
			</tr>
			</form>
		</table>
	</div>
</div>

<include file="./Tpl/default/Admin/Public/footer.html" />


